package com.suredy.app.porject.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.suredy.core.model.BaseModel;
import com.suredy.security.entity.OrgEntity;

/**
 * 客户单位信息
 * 
 * @author VIVID.G
 * @since 2015-10-12
 * @version v0.1
 */
@Entity
@Table(name = "tb_biddinger")
public class Biddinger extends BaseModel {

	private static final long serialVersionUID = 1L;

	/* 客户单位名称 */
	@Column(length = 200, nullable = false)
	private String company;

	/* 客户单位地址 */
	@Column(length = 500)
	private String addr;

	/* 邮编 */
	@Column(length = 10)
	private String zip;

	/* 网址 */
	@Column(length = 500)
	private String url;

	/* 信息归属单位 */
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name = "org_id")
	private OrgEntity owner;

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getAddr() {
		return addr;
	}

	public void setAddr(String addr) {
		this.addr = addr;
	}

	public String getZip() {
		return zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public OrgEntity getOwner() {
		return owner;
	}

	public void setOwner(OrgEntity owner) {
		this.owner = owner;
	}

}
